<?php $errorStr='';if(!filter_has_var(INPUT_POST,'ids')||!is_array($_POST['ids'])||!filter_has_var(INPUT_POST,'status')||($_POST['status']!='on'&&$_POST['status']!='off')){$errorStr="参数错误，删除失败";}if(!$errorStr){$articleObj=(new Zmsun\Copen\TopPackage("zm345.open.enterpr",new Zmsun\Copen\OpenLib($this->serviceManager->get("Database"),$this->serviceManager->get("DBTablePrefix"))))->article;$articleUpdate=$articleObj->articlesUpdate->setRefIds($_POST['ids']);$errorStr=$articleUpdate->setTopmost($_POST['status']=='on'? true:false)->exec();if($errorStr['status']=='error'){$errorStr=$errorStr['error_msg'];}else{$errorStr='';}}if($errorStr){echo json_encode(['status'=>'error','data'=>['msg'=>$errorStr],]);}else{echo json_encode(['status'=>'ok','data'=>['msg'=>$errorStr],]);}?>